package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserWithdrawLogDTO;
import com.financing.wap.dao.IDstUserWithdrawLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_withdraw_log  
 * 提现积分兑换记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserWithdrawLogDao")
public class DstUserWithdrawLogDaoImpl extends BaseDaoImpl<DstUserWithdrawLogDTO, java.lang.Integer> implements IDstUserWithdrawLogDao {


	@Override
	public int insert(DstUserWithdrawLogDTO dstUserWithdrawLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserWithdrawLogSql.insert, dstUserWithdrawLog);
	}

	@Override
	public void update(DstUserWithdrawLogDTO dstUserWithdrawLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserWithdrawLogSql.update, dstUserWithdrawLog);
	}

	@Override
	public void updateForce(DstUserWithdrawLogDTO dstUserWithdrawLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserWithdrawLogSql.updateForce, dstUserWithdrawLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserWithdrawLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserWithdrawLogDTO> queryList(DstUserWithdrawLogDTO dstUserWithdrawLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserWithdrawLogSql.queryList, dstUserWithdrawLog);
	}

	@Override
	public int queryListCount(DstUserWithdrawLogDTO dstUserWithdrawLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserWithdrawLogSql.queryListCount, dstUserWithdrawLog);
	}

	@Override
	public DstUserWithdrawLogDTO loadById(Integer id) throws SQLException {
		return  (DstUserWithdrawLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserWithdrawLogSql.loadById,id);
	}

	@Override
	public Class<DstUserWithdrawLogDTO> getEntityClass() {
		return DstUserWithdrawLogDTO.class;
	}
 	
}
